package com.neu.credit.creditscore.service.books;

import com.neu.credit.creditscore.common.utils.Result;
import com.neu.credit.creditscore.dto.req.AddBookReq;
import com.neu.credit.creditscore.dto.res.book.BookPreOrderInfoRes;
import com.neu.credit.creditscore.dto.res.book.BookRecordRes;
import com.neu.credit.creditscore.dto.res.book.BooksListingRes;
import com.neu.credit.creditscore.dto.res.book.BooksPageListRes;
import com.neu.credit.creditscore.entity.books.Books;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 图书信息表 服务类
 * </p>
 *
 * @author baomidou
 * @since 2025-06-14
 */
public interface BooksService extends IService<Books> {

    Result<List<Books>> getRecommendBook();

    Result<BooksPageListRes> getBooksPage(int pageNum, int pageSize, int categoryId, String title);

    Result<Books> getBooksDetail(int bookId);

    Result<BooksListingRes> getBookListing( Integer userId );

    Result<String> addBookListing(int bookId, Integer userId );

    Result<String> deteledBookListing(int bookId, Integer userId );

    Result<BookPreOrderInfoRes> preOrderListing( Integer userId );

    Result<String> payOrderListing(int bookReturnFeeId  );

    Result<BookRecordRes>   borrowingsRecord(Integer userId );

    Result<String> returnBookFee( Integer bookId,Integer  borrowingsId );

    Result<String> saveBook(Books  books );

    Result<String> deletedBook(int bookId);

    Result<String> updateBook(Books books );
}
